import request from '@/utils/request'

// 查询体测项目数据列表
export function listTcsj(query) {
  return request({
    url: '/tc/tcsj/list',
    method: 'get',
    params: query
  })
}

// 查询体测项目数据详细
export function getTcsj(id) {
  return request({
    url: '/tc/tcsj/' + id,
    method: 'get'
  })
}

// 新增体测项目数据
export function addTcsj(data) {
  return request({
    url: '/tc/tcsj',
    method: 'post',
    data: data
  })
}

// 修改体测项目数据
export function updateTcsj(data) {
  return request({
    url: '/tc/tcsj',
    method: 'put',
    data: data
  })
}
export function updateTcsjPL(data) {
  return request({
    url: '/tc/tcsj/upPL',
    method: 'put',
    data: data
  })
}

// 删除体测项目数据
export function delTcsj(id) {
  return request({
    url: '/tc/tcsj/' + id,
    method: 'delete'
  })
}


// 按班级查询体测记录
export function getGradeView(schoolId) {
  return request({
    url: '/tc/tcview/gradeView/' + schoolId, 
    method: 'get'
  })
}

//成绩排行
export function getTcRank(params) {
  return request({
    url: '/tc/tcsj/getTcRank',
    method: 'get',
    params: params
  })
}